package edu.gatech.cs2340.bytebankers.tests;

import static org.junit.Assert.*;

import java.awt.Color;
import java.awt.Dimension;

import javax.swing.JFrame;

import org.junit.Test;

import edu.gatech.cs2340.bytebankers.model.Journey;
import edu.gatech.cs2340.bytebankers.model.Leader;
import edu.gatech.cs2340.bytebankers.model.Wagon;
import edu.gatech.cs2340.bytebankers.model.item.Ammunition;
import edu.gatech.cs2340.bytebankers.model.item.Clothing;
import edu.gatech.cs2340.bytebankers.model.item.Food;
import edu.gatech.cs2340.bytebankers.model.item.Ox;
import edu.gatech.cs2340.bytebankers.model.profession.Banker;
import edu.gatech.cs2340.bytebankers.notifications.Notifier;
import edu.gatech.cs2340.bytebankers.presenter.JourneyPresenter;
import edu.gatech.cs2340.bytebankers.presenter.MapPresenter;
import edu.gatech.cs2340.bytebankers.presenter.StartupPresenter;
import edu.gatech.cs2340.bytebankers.view.JourneyView;
import edu.gatech.cs2340.bytebankers.view.MapView;
import edu.gatech.cs2340.bytebankers.view.UIStartUpView;

public class JourneyViewTest 
{
	private static Food food;
	private static Clothing clothing;
	private static Ox ox;
	private static Ammunition ammo;
	
	static JFrame frame;
	static JourneyPresenter presenter;
	static JourneyView jview;
	static MapView mview;
	static MapPresenter presenter2;
	
	public static void main(String[] args)
	{	
		Journey journey = new Journey();
		journey.setLastLocation(journey.getTrail().getLocationList().getFirst());
		Wagon wagon = new Wagon();
		Leader leader = new Leader();
		Banker banker = new Banker();
		leader.setProfession(banker);		
		
		wagon.addItemQuantity(food, 5);
		wagon.addItemQuantity(clothing, 5);
		wagon.addItemQuantity(ox, 2);
		wagon.addItemQuantity(ammo, 10);
		
		journey.setLeader(leader);
		journey.setWagon(wagon);
		
		// Create a frame
		frame = new JFrame("Oregon Trail: Byte Banker Style!");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setBackground(new Color(80, 80, 80));
		frame.setPreferredSize(new Dimension(860, 500));
			
		// Create the view/presenter and hook them up
		presenter2 = new MapPresenter(journey);
		mview = new MapView((MapPresenter)presenter2);
		((MapPresenter)presenter2).setView(mview);
				
		// Add the view
		frame.getContentPane().add(mview.getMainPanel());
				
		frame.pack();
		frame.setVisible(true);
	}
}
